//
//  UIView+YMJ_view.m
//  27-block练习播放按钮
//
//  Created by 殷殷明静 on 16/8/19.
//  Copyright © 2016年 殷明静. All rights reserved.
//

#import "UIView+YMJ_view.h"

@implementation UIView (YMJ_view)
- (void)setYmj_centerY:(CGFloat)ymj_centerY {
    CGPoint center = self.center;
    center.y = ymj_centerY;
    self.center = center;
}
- (CGFloat)ymj_centerY {
    return self.center.y;
}
- (void)setYmj_centerX:(CGFloat)ymj_centerX {
    CGPoint center = self.center;
    center.x = ymj_centerX;
    self.center = center;
}
- (CGFloat)ymj_centerX {
    return self.center.x;
}
- (void)setYmj_top:(CGFloat)ymj_top {
    CGRect rect = self.frame;
    rect.origin.y = ymj_top;
    self.frame = rect;
}
- (CGFloat)ymj_top {
    return self.frame.origin.y;
}
- (void)setYmj_left:(CGFloat)ymj_left {
    CGRect rect = self.frame;
    rect.origin.x = ymj_left;
    self.frame = rect;
}
- (CGFloat)ymj_left {
    return self.frame.origin.x;
}
- (void)setYmj_width:(CGFloat)ymj_width {
    CGRect rect = self.frame;
    rect.size.width = ymj_width;
    self.frame = rect;
}
- (CGFloat)ymj_width {
    return self.frame.size.width;
}
- (void)setYmj_height:(CGFloat)ymj_height {
    CGRect rect = self.frame;
    rect.size.height = ymj_height;
    self.frame = rect;
}
- (CGFloat)ymj_height {
    return self.frame.size.height;
}
@end
